﻿@using Comercio.Models.proxymodel
@model productoProxy
                                        
@{
    ViewBag.Title = "Ingresar producto";
}

<h2>Ingresar Producto</h2><br />

@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Productos</legend>


        <div class="editor-label">
            @Html.LabelFor(model => model.descripcion, "Descripción del producto")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.descripcion)
            @Html.ValidationMessageFor(model => model.descripcion)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.idcateg, "Seleccione categoría del producto")
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.idcateg, new SelectList(Model.Categorias, "IDcate", "descripcate"))
            @Html.ValidationMessageFor(model => model.idcateg)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.cantidad, "Cantidad")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.cantidad)
            @Html.ValidationMessageFor(model => model.cantidad)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.stockminimo, "Stock mínimo permitido")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.stockminimo)
            @Html.ValidationMessageFor(model => model.stockminimo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.precio, "Precio")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.precio)
            @Html.ValidationMessageFor(model => model.precio)
        </div>

        <p>
            <input type="submit" value="Ingresar" />
        </p>
    </fieldset>
}
    
<div>
    @Html.ActionLink("Volver", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
